package nci60.data.maxquant

/**
 * This class represents one MaxQuant analysis (project/dataset/experiment) 
 * <p />
 * The name of the sql table is customized to 'projects' <p />
 * <b>See Also:</b> {@link #mapping}
 * 
 * @autor <a href="mailto:Florian.J.Auer@googlemail.com">Florian J. Auer</a>
*/
class Project {

    /**
     * Id attribute for the table. Is also used as primary key. <p />
     * This property is normaly generated and accessable for every domain class! 
     */
    Integer id
    
    /**
     * The name of the project/dataset/experiment/analysis
     */
    String name

    /**
     * GRAILS <a href="http://grails.org/doc/latest/guide/GORM.html#ormdsl" target="_blank">Custom ORM Mapping</a>
     * <p />
     * Grails domain classes can be mapped onto many legacy schemas with an Object Relational Mapping DSL (domain specific language). 
     */	
    static mapping = {
        version false
        autoTimestamp false
        table 'projects'
    }

    /**
     * GRAILS <a href="http://grails.org/doc/latest/guide/single.html#constraints" target="_blank">Declaring Constraints</a>
     * <p />
     * Constraints in Grails are a way to declaratively specify validation rules for generating objects in GORM.
     */	
    static constraints = {
    }

    /**
     * GRAILS default representation of the object as String
     * @return String representation of the object
     */	
    String toString(){
        return "Project $id: $name"
    }
}